package com.xindacloud.sms.console.result;

import java.io.Serializable;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.MultiValueMap;

public class Result<T> extends ResponseEntity<T> implements Serializable {
	private ResultBody<T> resultBody;

	/**
	 * response result 构造函数
	 * 
	 * @param headers 请求头
	 * @param status  状态
	 */
	public Result(MultiValueMap<String, String> headers, HttpStatus status) {
		super(headers, status);
	}

	/**
	 * response result 构造函数
	 * 
	 * @param body   返回body
	 * @param status 状态
	 */
	public Result(T body, HttpStatus status) {
		super(body, status);
	}

	/**
	 * 带headers的response result 构造函数
	 * 
	 * @param body    返回body
	 * @param headers 请求头
	 * @param status  状态
	 */
	public Result(T body, MultiValueMap<String, String> headers, HttpStatus status) {
		super(body, headers, status);
	}

	public ResultBody<T> getResultBody() {
		return resultBody;
	}

	public void setResultBody(ResultBody<T> resultBody) {
		this.resultBody = resultBody;
	}

}
